<?php

class EditionoptionsCollectionForm extends sfForm
{
  public function configure()
  {
    if (!$ownChoice = $this->getOption('ownchoiceid'))
    {
      throw new InvalidArgumentException('You must provide a own choice object.');
    }
 
//     $subForm = new sfForm();
//    $subSubForm = new sfForm();
    
//    $clientOrder = new Clientorder();
    $editionOptions = new Editionoptions();
    
    $editionOptions->setOwnchoice($ownChoice);
//    $clientOrder->setEditionoptions($editionOptions);
    
//    $form = new ClientorderForm($clientOrder);
    $subForm = new EditionoptionsForm($editionOptions);
//    $subForm->embedForm('Client order form', $form);
    $this->embedForm('edition options form', $subForm);
    
//    $this->embedForm('Own choice form', $subSubForm);
//    
//    //+++++++++
//    $clientOrder = new Clientorder();
//    $clientOrder->setEditionoptions($editionOptions);
//    
//    $form = new ClientorderForm($clientOrder);
//    $this->embedForm('Client order form', $form);
  }
}
?>
